[20250608] BOJ / G4 / 호텔 / 이강현 #338
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/1106
🧭 풀이 시간
60분
👀 체감 난이도
✏️ 문제 설명
도시에 홍보를 하면 고객을 불러들일 수 있음. 도시마다 홍보에 드는 비용과 그때 얻을 수 있는 고객 수가 정해질때, 최소 C이상의 고객을 얻을 수 있는 최소 비용을 출력하자.
🔍 풀이 방법
unbounded knapsack 문제
⏳ 회고
C명 이상이므로 dp 배열을 좀 더 넉넉하게 잡아야한다는 점. 한 도시를 여러번 반복해서 접근 가능하니 정순으로 탐색해야한다는 점.